<?php

Route::get('/', function () {
    return view('welcome');
});

Route::group(['namespace' => 'Frontend'], function () {

    Route::group(['prefix' => 'hr', 'namespace' => 'Hr'], function () {


        Route::post('signup', 'AuthController@signup');
        Route::put('signin', 'AuthController@signin');
        Route::get('signout', 'AuthController@signout');


        Route::get('talents/create', 'TalentController@create');
        Route::post('talents', 'TalentController@store');
        Route::get('talents/{id}', 'TalentController@edit');
        Route::put('talents/{id}', 'TalentController@update');
        Route::delete('talents/{id}', 'TalentController@delete');


        Route::group(['middleware' => 'role:hr'], function() {
            Route::get('/', 'DashboardController@index');
        });

    });

    Route::group(['prefix' => 'company', 'namespace' => 'Company'], function () {

        Route::post('signup', 'AuthController@signup');
        Route::put('signin', 'AuthController@signin');
        Route::get('signout', 'AuthController@signout');

        Route::group(['middleware' => 'role:company'], function() {
            Route::get('/', 'DashboardController@index');
        });
    });
});